package com.mingdao.lhy.config;

import javax.xml.ws.Endpoint;

import org.apache.cxf.Bus;
import org.apache.cxf.jaxws.EndpointImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import com.mingdao.lhy.service.WishFillingService;

@Configuration
public class CxfConfig {
	@Autowired
	private Bus bus;

	@Autowired
	WishFillingService wishFillingService;

	/** JAX-WS **/
	@Bean
	public Endpoint endpoint() {
		EndpointImpl endpoint = new EndpointImpl(bus, wishFillingService);
		endpoint.publish("/WishFilling");
		return endpoint;
	}

	@Bean
	public Endpoint endpoint2() {
		EndpointImpl endpoint = new EndpointImpl(bus, wishFillingService);
		endpoint.publish("/commonService");
		return endpoint;
	}
}